package tp.disenio.shared;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the disponibilidad database table.
 * 
 */
@Embeddable
public class DisponibilidadPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	private int FK_id_competencia;
	private int FK_id_realizacion;

	
	/**
	 * 
	 */
    public DisponibilidadPK() {
    }
    
    
	/**
	 * 
	 */
    public DisponibilidadPK(int idCompetencia, int idRealizacion) {
    	this.FK_id_competencia = idCompetencia;
    	this.FK_id_realizacion = idRealizacion;
    }
    
    
    /**
     * 
     * @return
     */
	public int getFK_id_competencia() {
		return this.FK_id_competencia;
	}
	
	
	/**
	 * 
	 * @param FK_id_competencia
	 */
	public void setFK_id_competencia(int FK_id_competencia) {
		this.FK_id_competencia = FK_id_competencia;
	}
	
	
	/**
	 * 
	 * @return
	 */
	public int getFK_id_realizacion() {
		return this.FK_id_realizacion;
	}
	
	
	/**
	 * 
	 * @param FK_id_realizacion
	 */
	public void setFK_id_realizacion(int FK_id_realizacion) {
		this.FK_id_realizacion = FK_id_realizacion;
	}

	
	/**
	 * 
	 */
	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof DisponibilidadPK)) {
			return false;
		}
		DisponibilidadPK castOther = (DisponibilidadPK)other;
		return 
			(this.FK_id_competencia == castOther.FK_id_competencia)
			&& (this.FK_id_realizacion == castOther.FK_id_realizacion);

    }
    
	
	/**
	 * 
	 */
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.FK_id_competencia;
		hash = hash * prime + this.FK_id_realizacion;
		
		return hash;
    }
}